package com.zhouxiaoge.builderpattern;

import com.zhouxiaoge.builderpattern.meal.Meal;
import com.zhouxiaoge.builderpattern.meal.MealBuilder;

public class BuilderPatternDemo {
    public static void main(String[] args) {
        MealBuilder mealBuilder = new MealBuilder();

        Meal meal = mealBuilder.prepareVegMeal();
        System.out.println("Veg Meal");

        meal.showItems();
        System.out.println("总价: " + meal.getCost());

        Meal meal1 = mealBuilder.prepareNonVegMeal();
        System.out.println("Non-Veg Meal");
        meal1.showItems();
        System.out.println("总价: " + meal1.getCost());

    }
}
